<template>
  <div class="bg-purple">
    <div class="stars">
      <div class="central-body">
        <p>404</p>
        <a href="" class="btn-go-home">不再180s</a>
      </div>
      <div class="objects">
        <img class="object_rocket" src="/404svg/rocket.svg" width="40px" />
        <div class="earth-moon">
          <img class="object_earth" src="/404svg/earth.svg" width="100px" />
          <img class="object_moon" src="/404svg/moon.svg" width="80px" />
        </div>
        <div class="box_ren">
          <img class="object_ren" src="/404svg/ren.svg" width="140px" />
        </div>
      </div>
      <div class="glowing_stars">
        <div class="star"></div>
        <div class="star"></div>
        <div class="star"></div>
        <div class="star"></div>
        <div class="star"></div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "NotFound404",
};
</script>

<style scoped>
@import url("https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900&family=Bungee+Spice&family=Exo+2:ital,wght@0,100..900;1,100..900&family=Nunito:ital,wght@0,200..1000;1,200..1000&family=Protest+Strike&display=swap");

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  font-family: "Protest Strike", sans-serif;
  font-weight: 300;
  user-select: none;
}

.bg-purple {
  background: url(/404svg/bg_purple.png);
  background-repeat: repeat-x;
  background-size: cover;
  background-position: left top;
  height: 100%;
  overflow: hidden;
}

.btn-go-home {
  position: relative;
  z-index: 200;
  margin: 15px auto;
  width: 100px;
  padding: 10px 15px;
  border: 1px solid #ffcb39;
  border-radius: 100px;
  font-weight: 500;
  display: block;
  color: white;
  text-align: center;
  text-decoration: none;
  letter-spacing: 2px;
  font-size: 18px;
  transition: all 0.3s ease-in;
}

.btn-go-home:hover {
  background-color: #ffcb39;
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0px 20px 20px rgba(0, 0, 0, 0.1);
}

.central-body {
  padding: 15%;
  text-align: center;
}

.central-body p {
  font-size: 7em;
  color: #fff;
  text-shadow: 5px 5px 5px rgb(120, 35, 201);
}

.objects img {
  z-index: 90;
  pointer-events: none;
}

.object_rocket {
  z-index: 95;
  position: absolute;
  transform: translateX(-50px);
  top: 75%;
  pointer-events: none;
  animation: rocket-movement 80s linear infinite both;
}

.object_earth {
  position: absolute;
  top: 20%;
  left: 15%;
  z-index: 90;
  animation: spin-earth 40s infinite linear both;
}

.object_moon {
  position: absolute;
  top: 12%;
  left: 25%;
}

.object_ren {
  animation: rotate-ren 200s infinite linear alternate;
}

.box_ren {
  z-index: 110 !important;
  position: absolute;
  top: 60%;
  right: 20%;
  will-change: transform;
  animation: move-ren 50s infinite linear alternate;
}

.image-404 {
  position: relative;
  z-index: 100;
  pointer-events: none;
}

.stars {
  background: url(/404svg/overlay_stars.svg);
  background-repeat: repeat;
  background-size: contain;
  background-position: left top;
}

.glowing_stars .star {
  position: absolute;
  border-radius: 100%;
  background-color: #fff;
  width: 3px;
  height: 3px;
  opacity: 0.3;
  will-change: opacity;
}

.glowing_stars .star:nth-child(1) {
  top: 80%;
  left: 25%;
  animation: glow-star 2s infinite ease-in-out alternate 1s;
}

.glowing_stars .star:nth-child(2) {
  top: 20%;
  left: 40%;
  animation: glow-star 2s infinite ease-in-out alternate 3s;
}

.glowing_stars .star:nth-child(3) {
  top: 25%;
  left: 25%;
  animation: glow-star 2s infinite ease-in-out alternate 5s;
}

.glowing_stars .star:nth-child(4) {
  top: 75%;
  left: 80%;
  animation: glow-star 2s infinite ease-in-out alternate 7s;
}

.glowing_stars .star:nth-child(5) {
  top: 90%;
  left: 50%;
  animation: glow-star 2s infinite ease-in-out alternate 9s;
}

@media (max-width: 600px) {
  .box_ren {
    top: 70%;
  }
  .central-body {
    margin-top: 30%;
  }
}

/* Animations */
@keyframes rocket-movement {
  100% {
    transform: translate(1200px, -600px);
  }
}

@keyframes spin-earth {
  100% {
    transform: rotate(-360deg);
    transition: transform 20s;
  }
}

@keyframes move-ren {
  100% {
    transform: translate(-160px, -160px);
  }
}

@keyframes rotate-ren {
  100% {
    transform: rotate(-720deg);
  }
}

@keyframes glow-star {
  40% {
    opacity: 0.3;
  }
  90%,
  100% {
    opacity: 1;
    transform: scale(1.2);
    border-radius: 999999px;
  }
}
</style>
